package com.lyx.server.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lyx.server.entity.Coupon;
import org.apache.ibatis.annotations.Update;

/**
 * 优惠券表(Coupon)表数据库访问层
 *
 * @author McMeloxD
 * @since 2024-08-14 17:40:22
 */
public interface CouponDao extends BaseMapper<Coupon> {

    @Update("update t_coupon set takenum=takenum+1,update_time=now() where id=#{id}")
    int updateTakeNum(Integer id);
}

